<template>
	<view>
		<view class="menu">
			<image @click="backUrl" v-if="isBack" class="icon" src="../static/return.png" mode="widthFix"></image>
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default {
		name: "header",
		props: {
			tag: String,
			isBack: String
		},
		data() {
			return {

			};
		},
		methods: {
			backUrl() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss">
	.menu {
		background-color: #3484FF;
		display: flex;
		align-items: center;
		padding: 12rpx 0px;
		justify-content: center;
		height: 80rpx;
	}

	.icon {
		width: 40rpx;
		position: absolute;
		left: 16rpx;
		top: 20rpx;
	}
</style>